diff options
| author | 2019-11-22 02:14:25 +0530 | |
|---|---|---|
| committer | 2019-11-22 11:13:34 +0530 | |
| commit | 1cca9e4b72b106374f203890b266f18609deefe3 (patch) | |
| tree | 9f281f4b4de296c54d13dc9c7e214f58835636a7 /plugins/.nnn-plugin-helper | |
| parent | ee2dcb1de7d3e82b330f49ee9fb5dfd4608207ff (diff) | |
| download | nnn-1cca9e4b72b106374f203890b266f18609deefe3.tar.gz | |
shellcheck fixes
Diffstat (limited to 'plugins/.nnn-plugin-helper')
| -rw-r--r-- | plugins/.nnn-plugin-helper | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/.nnn-plugin-helper b/plugins/.nnn-plugin-helper index ec66a29..c26566d 100644 --- a/plugins/.nnn-plugin-helper +++ b/plugins/.nnn-plugin-helper @@ -6,6 +6,7 @@ # Author: Anna Arad selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection +export selection ## Ask nnn to switch to directory $1 in context $2. ## If $2 is not provided, the function asks explicitly. @@ -20,11 +21,11 @@ nnn_cd () { if [ -n "$2" ]; then context=$2 else - echo -n "Choose context 1-4 (blank for current): " - read context + printf "Choose context 1-4 (blank for current): " + read -r context fi - echo -n ${context:-0}$dir > $NNN_PIPE + printf "%s" "${context:-0}$dir" > "$NNN_PIPE" } cmd_exists () { |