Compare commits

...

6 Commits

6 changed files with 22 additions and 5 deletions

View File

@ -3041,6 +3041,14 @@ function build_action() {
die "Pas encore implémenté" #XXX
;;
build)
[ -n "$machine" ] && DKBUILD_CMD_ARGS+=(-m "$machine")
[ -n "$sync_src" ] && DKBUILD_CMD_ARGS+=(-s)
[ -n "$build" ] && DKBUILD_CMD_ARGS+=(-b)
[ -n "$no_cache" ] && DKBUILD_CMD_ARGS+=(--no-cache)
[ "$progress" == plain ] && DKBUILD_CMD_ARGS+=(--plain-output)
[ -n "$pull_image" ] && DKBUILD_CMD_ARGS+=(-U)
[ -n "$push_image" ] && DKBUILD_CMD_ARGS+=(-p)
default checkout checkout="$update_src"
default copy copy="$sync_src"
default build build="$build" ${no_cache:+no-cache} ${pull_image:+pull} ${push_image:+push}

View File

@ -50,8 +50,8 @@ done
rm -f ~/etc/bashrc.d/bash_completion.nutools # renommé
mkdir -p ~/etc/completion.d
bcdir=lib/completion.d
./pdev --nutools-completion >"$bcdir/pdev"
./prel --nutools-completion >"$bcdir/prel"
#./pdev --nutools-completion >"$bcdir/pdev"
#./prel --nutools-completion >"$bcdir/prel"
#./pfix --nutools-completion >"$bcdir/pfix"
./pff --nutools-completion >"$bcdir/pff"

View File

View File

11
pff
View File

@ -1505,10 +1505,17 @@ function list_profiles_cmd() {
# pff --switch
function switch_cmd() {
local clean=
if [ "$1" == --clean ]; then
shift
clean=1
fi
local profile="$1" pffdir="$2"
local -a profiles
ensure_pffdir pffdir "$pffdir"
[ -n "$clean" ] && rm -rf "$pffdir/pff/Current"
autoinit "$pffdir"
[ -n "$profile" ] || setx profile=get_first_profile "$pffdir"
@ -1842,6 +1849,7 @@ merge_strategy=
commit_policy=ask
profile=
alternate=
clean_switch=
args=($parse_mode
--help '$exit_with display_help'
-0,--init action=init
@ -1867,6 +1875,7 @@ args=($parse_mode
--locals action=list-locals
--profiles action=list-profiles
-s,--switch action=switch
--sk,--clean-switch clean_switch=1
-a,--add-local action=add-local
-e,--edit action=edit
-p:,--profile: profile=
@ -1888,7 +1897,7 @@ patch) patch_cmd "$merge_strategy" "$commit_policy" "$@";;
add-global) add_global_cmd "$@";;
list-locals) list_locals_cmd "$@";;
list-profiles) list_profiles_cmd "$@";;
switch) switch_cmd "$@";;
switch) switch_cmd ${clean_switch:+--clean} "$@";;
add-local) add_local_cmd "$@";;
edit) edit_cmd "$profile" "$@";;
diff) diff_cmd "$alternate" "$@";;

View File

@ -155,7 +155,7 @@ SCRIPT_ALIASES=(
pxg:xget pxs:xsync pxw:xwhereis pxwa:xwebapp
pxinitial:xinitial
pnew:new
pgr:grep
nupgr:grep
paddml:addml
)
CMD_ALIASES=(
@ -196,7 +196,7 @@ ML_CMDS=(printml addml)
if [ "$#" -eq 1 -a "$1" == --nutools-makelinks ]; then
# créer les liens
scriptname="$(basename "$0")"
for alias in p "${SCRIPT_ALIASES[@]}"; do
for alias in nup "${SCRIPT_ALIASES[@]}"; do
alias="${alias%:*}"
ln -s "$scriptname" "$alias"
done